<!doctype html>
<html>
<head>
<?php $this->load->view('common_head'); ?>
<link href="<?php echo base_url(); ?>themes/manage/default/css/style.css?v=<?php echo UI_VERSION; ?>" rel="stylesheet" />
</head>
<body>
<div class="wrap">
	<?php $this->load->view('common_header'); ?>
	<div class="main_wrap">
		<div class="main cc">
			<div class="bread_crumb"> <a class="home" href="<?php echo base_url(); ?>" title="返回首页">首页</a><em>&gt;</em><a href="<?php echo site_url('manage/user/index'); ?>" title="我的控制面板">控制面板</a> </div>
			<!--<h1 class="manage_bread">控制面板</h1>-->
			<div class="cc manage_page">
				<div class="msidebar">
					<div class="menubar">
						<?php $this->load->view('manage/common_left'); ?>
					</div>
				</div>
				<div class="mbody">
					<div class="mcontent">
						<div class="box_wrap">
							<div class="content">
								<div class="content_nav">
									<ul>
										<li class="current"><a href="<?php echo site_url('manage/post/addsale'); ?>">发布出售</a></li>
										<li><a href="<?php echo site_url('manage/post/addhire'); ?>">发布出租</a></li>
									</ul>
								</div>
								<div class="manage_ct">
									<form method="post" action="<?php echo site_url('manage/user/password'); ?>" class="J_profile_form">
										<table class="mb10">
											<colgroup>
												<col width="90" />
												<col />
											</colgroup>
											<tbody>
												<?php $posttypename = array('fixed'=>'剩余','mon'=>'每月','week'=>'每周','day'=>'每日'); ?>
												<tr>
													<th>发布权限 &nbsp;</th>
													<td>
														<span class="mr5"><?php echo $posttypename[$postright['posttype']]; ?>发布量<?php echo $postright['postnum']; ?>条</span>
														<span>今日：<em class="mr5"><?php echo $this->user['todaysalenum'] + $this->user['todayhirenum']; ?></em> <span class="gray mr5">|</span><!--本周：<em class="mr5"><?php echo $this->user['weeksalenum'] + $this->user['weekhirenum']; ?></em>--> 本月：<em class="mr5"><?php echo $this->user['monthsalenum'] + $this->user['monthhirenum']; ?></em></span>
													</td>
												</tr>
												<tr>
													<th>房源编号 &nbsp;</th>
													<td><input class="input length_3" name="record_number" value="房管部门备案编号" type="text" /></td>
												</tr>
												<tr>
													<th>特色标签 &nbsp;</th>
													<td>
														<input class="input length_5 mr5" name="tags" value="" type="text" />
														<div class="gray">随时看房 国际社区 泳池球场 私家车库 复式美居 豪华精装 划片名校 黄金商圈 山水景观 交通便利 投资潜力 附送家具 房东急售 免中介费</div>
													</td>
												</tr>
												<tr>
													<th>房源标题 <em class="red">*</em></th>
													<td><input class="input length_5" name="title" value="" type="text" /></td>
												</tr>
												<tr>
													<th>一句话广告 <em class="red">*</em></th>
													<td><input class="input mr5" style="width:472px;" name="title_info" value="您可以详细描述房源情况，及您对房客的要求，提升您的出租效率" type="text" /></td>
												</tr>
												<tr>
													<th>小区名称 <em class="red">*</em></th>
													<td><input class="input length_3" name="village" value="" /></td>
												</tr>
												<tr>
													<th>区域地址 <em class="red">*</em></th>
													<td>
														<select id="J_sort_1" class="select mr5" name="areatype" title="请选择区域">
															<option value="0">--区域--</option>
															<option value="1">石岐</option>
															<option value="2">东区</option>
															<option value="3">西区</option>
															<option value="4">南区</option>
															<option value="5">五桂山</option>
															<option value="6">小榄</option>
															<option value="7">古镇</option>
															<option value="8">三乡</option>
															<option value="9">港口</option>
															<option value="10">开发区</option>
															<option value="11">大涌</option>
															<option value="12">黄圃</option>
															<option value="13">南头</option>
															<option value="14">沙溪</option>
															<option value="15">中山周边</option>
														</select>
														<select id="J_sort_2" class="select mr5" name="platetype" title="请选择商圈">
															<option value="0">-商圈-</option>
														</select>
														<input class="input length_4" name="address" value="" title="请输入地址" />
													</td>
												</tr>
												<tr>
													<th>房屋状况 <em class="red">*</em></th>
													<td>
														<span class="mr5"><input class="input length_1 mr5" name="currentfloor" value="" />层 / 共</span>
														<span class="mr5"><input class="input length_1 mr5" name="totalfloor" value="" />层</span>
														<select name="fitment" class="select">
															<option value="0"  selected="selected mr5">--装修--</option>
															<option value="1" >简装</option>
															<option value="2" >中装</option>
															<option value="3" >精装</option>
															<option value="4" >豪装</option>
															<option value="5" >毛胚</option>
														</select>
														<select name="housetype" class="select">
															<option value="1" >普通住宅</option>
															<option value="2" >公寓</option>
															<option value="3" >花园式洋房</option>
															<option value="4" >酒店式公寓</option>
															<option value="5" >商住两用</option>
															<option value="6" >别墅</option>
															<option value="7" >写字楼</option>
															<option value="8" >商铺</option>
														</select>
													</td>
												</tr>
												<tr>
													<th>房屋户型 <em class="red">*</em></th>
													<td>
														<span class="mr5"><input class="input length_1 mr5" name="acreage" value="" />方</span>
														<span class="mr5">
															<select class="mr5" name="room[bedroom]">
																<option value="1"  selected="selected">1</option>
																<option value="2" >2</option>
																<option value="3" >3</option>
																<option value="4" >4</option>
																<option value="5" >5</option>
																<option value="6" >6</option>
																<option value="7" >7</option>
																<option value="8" >8</option>
																<option value="9" >9</option>
															</select>房
														</span>
														<span class="mr5">
															<select class="mr5" name="room[hall]">
																<option value="0"  selected="selected">0</option>
																<option value="1" >1</option>
																<option value="2" >2</option>
																<option value="3" >3</option>
																<option value="4" >4</option>
																<option value="5" >5</option>
															</select>厅
														</span>
														<span class="mr5">
															<select class="mr5" name="room[toilet]">
																<option value="0" >0</option>
																<option value="1"  selected="selected">1</option>
																<option value="2" >2</option>
																<option value="3" >3</option>
																<option value="4" >4</option>
																<option value="5" >5</option>
															</select>卫
														</span>
														<span class="mr5">
															<select class="mr5" name="room[terrace]">
																<option value="0"  selected="selected">0</option>
																<option value="1" >1</option>
																<option value="2" >2</option>
																<option value="3" >3</option>
																<option value="4" >4</option>
																<option value="5" >5</option>
															</select>阳台
														</span>
														<select name="direction" class="select">
															<option value="0"  selected="selected">--朝向--</option>
															<option value="1">东</option>
															<option value="2">南</option>
															<option value="3">西</option>
															<option value="4">北</option>
															<option value="6">南北</option>
															<option value="5">东西</option>
															<option value="7">东南</option>
															<option value="8">西南</option>
															<option value="9">东北</option>
															<option value="10">西北</option>
														</select>
													</td>
												</tr>
												<tr>
													<th>价格产权 <em class="red">*</em></th>
													<td>
														<span class="mr5"><input class="input length_1 mr5" name="price" value="0" />万元</span>
														<select name="righter" class="select">
															<option value="1"  selected="selected">个人产权</option>
															<option value="2" >商品房</option>
															<option value="3" >使用权</option>
															<option value="4" >经济适用房</option>
															<option value="5" >公司产权</option>
														</select>
														<select class="select mr5" name="buildtime">
															<option value="0"  selected="selected">建筑年代</option>
															<option value="2012" >2012</option>
															<option value="2011" >2011</option>
															<option value="2010" >2010</option>
															<option value="2009" >2009</option>
															<option value="2008" >2008</option>
															<option value="2007" >2007</option>
															<option value="2006" >2006</option>
															<option value="2005" >2005</option>
															<option value="2004" >2004</option>
															<option value="2003" >2003</option>
															<option value="2002" >2002</option>
															<option value="2001" >2001</option>
															<option value="2000" >2000</option>
															<option value="1999" >1999</option>
															<option value="1998" >1998</option>
															<option value="1997" >1997</option>
															<option value="1996" >1996</option>
															<option value="1995" >1995</option>
															<option value="1994" >1994</option>
															<option value="1993" >1993</option>
															<option value="1992" >1992</option>
															<option value="1991" >1991</option>
															<option value="1990" >1990</option>
															<option value="1989" >1989</option>
															<option value="1988" >1988</option>
															<option value="1987" >1987</option>
															<option value="1986" >1986</option>
															<option value="1985" >1985</option>
															<option value="1984" >1984</option>
															<option value="1983" >1983</option>
														</select><span class="gray">（选择建筑年代）</span>
													</td>
												</tr>
												<tr>
													<th>交通状况 &nbsp;</th>
													<td><input class="input length_4" name="traffic" value="" /></td>
												</tr>
												<tr>
													<th>配套设施 &nbsp;</th>
													<td>
														<!-- <ul class="field_list list_w80"> -->
														<ul class="field_list">
															<!--床 默认选中-->
															<li>
																<input type="checkbox" id="equipment_1" name="equipment[]" value="1"  checked="checked" />
																<label for="equipment_1">床</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_2" name="equipment[]" value="2"  />
																<label for="equipment_2">热水器</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_3" name="equipment[]" value="3"  />
																<label for="equipment_3">洗衣机</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_4" name="equipment[]" value="4"  />
																<label for="equipment_4">空调</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_5" name="equipment[]" value="5"  />
																<label for="equipment_5">冰箱</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_6" name="equipment[]" value="6"  />
																<label for="equipment_6">电视</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_7" name="equipment[]" value="7"  />
																<label for="equipment_7">宽带</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_8" name="equipment[]" value="8"  />
																<label for="equipment_8">沙发</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_9" name="equipment[]" value="9"  />
																<label for="equipment_9">衣柜</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_10" name="equipment[]" value="10"  />
																<label for="equipment_10">桌子</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_11" name="equipment[]" value="11"  />
																<label for="equipment_11">微波炉</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_12" name="equipment[]" value="12"  />
																<label for="equipment_12">电梯</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_13" name="equipment[]" value="13"  />
																<label for="equipment_13">车位</label>
															</li>
															<li>
																<input type="checkbox" id="equipment_14" name="equipment[]" value="14"  />
																<label for="equipment_14">门禁</label>
															</li>
														</ul>
													</td>
												</tr>
												<tr>
													<th>补充说明 &nbsp;</th>
													<td><textarea name="body" style="width:472px;"></textarea></td>
												</tr>
												<tr>
													<th>房源图片 &nbsp;</th>
													<td></td>
												</tr>
											</tbody>
											<tfoot>
												<tr>
													<th></th>
													<td><button class="btn btn_submit btn_big" type="submit">填写无误并发布</button></td>
												</tr>
											</tfoot>
										</table>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--.main-wrap,#main End-->
	<?php $this->load->view('common_footer'); ?>
</div>
<script>
Wind.use('jquery', 'global', function() {
	//区域+商圈 关联选择开始
	<?php $areatypes = array(
		2 => array( //商圈:关联区域[2]（1是区域的键名）
			1 => '东区商圈1',
			2 => '东区商圈2',
			3 => '东区商圈3'
		),
		3 => array( //商圈:关联区域[3]（3是区域的键名）
			4 => '西区商圈1',
			5 => '西区商圈2',
			6 => '西区商圈3',
			7 => '西区商圈4'
		)
	); ?>
	var CURRENT_TOPIC_TYPE = parseInt('0'), //默认主题分类
		PARENT_TOPIC_TYPE = parseInt('0'), //默认二级父主题分类
		SORT_CONFIG = $.parseJSON('<?php echo json_encode($areatypes); ?>');	//分类数据

	var sort_1 = $('#J_sort_1'), sort_2 = $('#J_sort_2');

	//选择当前主题分类
	if(PARENT_TOPIC_TYPE) {
		//二级主题
		sort_1.val(PARENT_TOPIC_TYPE);
		sortSelect(PARENT_TOPIC_TYPE, CURRENT_TOPIC_TYPE);
	}else if(!PARENT_TOPIC_TYPE && CURRENT_TOPIC_TYPE) {
		//只有一级
		sort_1.val(CURRENT_TOPIC_TYPE);
		sortSelect(CURRENT_TOPIC_TYPE);
	}

	sort_1.on('change', function(){
			sortSelect($(this).val());
	});

	//切换下拉
	function sortSelect(s1, s2){
		var data = SORT_CONFIG[s1], //二级分类对象
			arr = [];

		if(data) { //存在二级分类对象
			//arr.push('<option value="0">请选择分类</option>');
			$.each(data, function(i, o){
				arr.push('<option value="'+ i +'">'+ o +'</option>');
			});
			sort_2.html(arr.join('')).show();

			if(s2) {
				//选中第二级分类
				sort_2.val(s2);
			}
		}else{
			//不存在二级分类
			sort_2.hide().empty();
		}
	}
	//区域+商圈 关联选择结束
});
</script>
</body>
</html>